package snake;

import java.awt.Color;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import snake.core.gameinterface.MainWindow;
import snake.gameplay.Position;
import snake.gameplay.Snake;

public class SnakeGame {

    public final static int SIZEX = 10;
    public final static int SIZEY = 10;

    public static void initGame() {
        MainWindow mf = new MainWindow(SIZEX, SIZEY);
        mf.setTitle("Snake game");
        mf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        mf.setVisible(true);

        Snake activeSnake = new Snake(3, new Position(5, 5));
        mf.initSnake(activeSnake);
    }

    public static void main(String[] args) {
        
        Runnable windowThread = new Runnable() {
            public void run() {
                initGame();
            }
        };
        SwingUtilities.invokeLater(windowThread);
        
    }
}
